function sortByOrderNo(dataArr, data) {
    let orderNo = data.orderNo
    if (orderNo < 1) {
        orderNo = 1
    } else if (orderNo > dataArr.length + 1) {
        orderNo = dataArr.length + 1
    }

    dataArr.splice(dataArr.indexOf(data), 1)
    dataArr.splice(orderNo - 1, 0, data)

    let orInd = 0
    for (const fd of dataArr) {
        fd.orderNo = ++orInd
    }
}

export default {
    sortByOrderNo
}